Optimal. Leaf size=45 \[ -\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0324412, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {1673, 12, 1093, 207, 1107, 616, 31} \[ -\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1673
Rule 12
Rule 1093
Rule 207
Rule 1107
Rule 616
Rule 31
Rubi steps
\begin{align*} \int \frac{d+e x}{4-5 x^2+x^4} \, dx &=\int \frac{d}{4-5 x^2+x^4} \, dx+\int \frac{e x}{4-5 x^2+x^4} \, dx\\ &=d \int \frac{1}{4-5 x^2+x^4} \, dx+e \int \frac{x}{4-5 x^2+x^4} \, dx\\ &=\frac{1}{3} d \int \frac{1}{-4+x^2} \, dx-\frac{1}{3} d \int \frac{1}{-1+x^2} \, dx+\frac{1}{2} e \operatorname{Subst}\left (\int \frac{1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=-\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)+\frac{1}{6} e \operatorname{Subst}\left (\int \frac{1}{-4+x} \, dx,x,x^2\right )-\frac{1}{6} e \operatorname{Subst}\left (\int \frac{1}{-1+x} \, dx,x,x^2\right )\\ &=-\frac{1}{6} d \tanh ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} d \tanh ^{-1}(x)-\frac{1}{6} e \log \left (1-x^2\right )+\frac{1}{6} e \log \left (4-x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0179092, size = 50, normalized size = 1.11 \[ \frac{1}{12} (-2 (d+e) \log (1-x)+(d+2 e) \log (2-x)+2 (d-e) \log (x+1)-(d-2 e) \log (x+2)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 58, normalized size = 1.3 \begin{align*} -{\frac{\ln \left ( 2+x \right ) d}{12}}+{\frac{\ln \left ( 2+x \right ) e}{6}}+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}+{\frac{\ln \left ( x-2 \right ) d}{12}}+{\frac{\ln \left ( x-2 \right ) e}{6}}-{\frac{\ln \left ( x-1 \right ) d}{6}}-{\frac{\ln \left ( x-1 \right ) e}{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.957648, size = 58, normalized size = 1.29 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left (x - 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.90501, size = 143, normalized size = 3.18 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left (x - 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 2.17518, size = 515, normalized size = 11.44 \begin{align*} - \frac{\left (d - 2 e\right ) \log{\left (x + \frac{- 35 d^{4} e + \frac{51 d^{4} \left (d - 2 e\right )}{2} - 180 d^{2} e^{3} - 90 d^{2} e^{2} \left (d - 2 e\right ) + 41 d^{2} e \left (d - 2 e\right )^{2} - \frac{15 d^{2} \left (d - 2 e\right )^{3}}{2} + 320 e^{5} - 96 e^{4} \left (d - 2 e\right ) - 80 e^{3} \left (d - 2 e\right )^{2} + 24 e^{2} \left (d - 2 e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{12} + \frac{\left (d - e\right ) \log{\left (x + \frac{- 35 d^{4} e - 51 d^{4} \left (d - e\right ) - 180 d^{2} e^{3} + 180 d^{2} e^{2} \left (d - e\right ) + 164 d^{2} e \left (d - e\right )^{2} + 60 d^{2} \left (d - e\right )^{3} + 320 e^{5} + 192 e^{4} \left (d - e\right ) - 320 e^{3} \left (d - e\right )^{2} - 192 e^{2} \left (d - e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{6} - \frac{\left (d + e\right ) \log{\left (x + \frac{- 35 d^{4} e + 51 d^{4} \left (d + e\right ) - 180 d^{2} e^{3} - 180 d^{2} e^{2} \left (d + e\right ) + 164 d^{2} e \left (d + e\right )^{2} - 60 d^{2} \left (d + e\right )^{3} + 320 e^{5} - 192 e^{4} \left (d + e\right ) - 320 e^{3} \left (d + e\right )^{2} + 192 e^{2} \left (d + e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{6} + \frac{\left (d + 2 e\right ) \log{\left (x + \frac{- 35 d^{4} e - \frac{51 d^{4} \left (d + 2 e\right )}{2} - 180 d^{2} e^{3} + 90 d^{2} e^{2} \left (d + 2 e\right ) + 41 d^{2} e \left (d + 2 e\right )^{2} + \frac{15 d^{2} \left (d + 2 e\right )^{3}}{2} + 320 e^{5} + 96 e^{4} \left (d + 2 e\right ) - 80 e^{3} \left (d + 2 e\right )^{2} - 24 e^{2} \left (d + 2 e\right )^{3}}{9 d^{5} - 160 d^{3} e^{2} + 256 d e^{4}} \right )}}{12} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09427, size = 69, normalized size = 1.53 \begin{align*} -\frac{1}{12} \,{\left (d - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac{1}{6} \,{\left (d + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac{1}{12} \,{\left (d + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]